package com.ldatum.crm.serviceImpl;

import java.util.List;

import com.ldatum.crm.dao.ContactsDao;
import com.ldatum.crm.daoImpl.ContactsDaoImpl;
import com.ldatum.crm.domain.Contacts;
import com.ldatum.crm.service.ContactsService;

public class ContactsServiceImpl implements ContactsService {
	
	ContactsDao contactsDao = new ContactsDaoImpl();
	@Override
	public void add(Contacts contacts) throws Exception {
		contactsDao.add(contacts);
	}

	@Override
	public void delete(Contacts contacts, int id) throws Exception {
		contactsDao.delete(contacts,id);

	}

	@Override
	public void update(Contacts contacts, int id) throws Exception {
		contactsDao.update(contacts,id);
	}

	@Override
	public Contacts findById(Class<Contacts> clazz, int id) throws Exception {
		
		return contactsDao.findById(clazz,id);
	}

	@Override
	public List<Contacts> list(Class<Contacts> clazz) throws Exception {
		return contactsDao.list(clazz);
	}

	@Override
	public List<Contacts> findByNo(Class<Contacts> clazz, String no) throws Exception {
		return contactsDao.findByNo(clazz,no);
	}

}
